;NSIS Modern User Interface
;Basic Example Script
;Written by Joost Verburg

;--------------------------------
;Include Modern UI

  !include "MUI2.nsh"

;--------------------------------
;General

  ;Name and file
  Name "Easy-PrintScreen"
  
  OutFile "Easy-PrintScreen v1.2.exe"


  ;Default installation folder
  InstallDir "$PROGRAMFILES\ioXiu\Easy-PrintScreen"
  ;icon
  ;Icon "Easy-PrintScreen.ico"
  Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-install.ico"
  ;Get installation folder from registry if available
  ;InstallDirRegKey HKCU "Software\Modern UI Test" ""

  ;Request application privileges for Windows Vista
  ;RequestExecutionLevel user
	
;--------------------------------
;Interface Settings

  !define MUI_ABORTWARNING

;--------------------------------
;Pages
;  !insertmacro MUI_PAGE_LICENSE "License.txt"

;  !insertmacro MUI_PAGE_COMPONENTS
  !insertmacro MUI_PAGE_DIRECTORY
  !insertmacro MUI_PAGE_INSTFILES
  
  !insertmacro MUI_UNPAGE_CONFIRM
  !insertmacro MUI_UNPAGE_INSTFILES
  
;--------------------------------
;Languages
 
  !insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

Section "Easy-PrintScreen" Easy-PrintScreen

  SetOutPath "$INSTDIR"
  
  ;ADD YOUR OWN FILES HERE...
 ; file "E:\program\program\easy-screenshot\ScreenShot\Release\KeyHook.dll"
 ; file "E:\program\program\easy-screenshot\ScreenShot\Release\Easy-PrintScreen.exe"
 ; file "E:\program\program\easy-screenshot\ScreenShot\Release\ScreenCapture.exe"
 
   file "E:\project\test\easy-screenshot\Release\KeyHook.dll"
  file "E:\project\test\easy-screenshot\Release\Easy-PrintScreen.exe"
  file "E:\project\test\easy-screenshot\Release\ScreenCapture.exe"
  file "E:\project\test\easy-screenshot\Release\Xupdate.dll"
 
  ;Store installation folder
  ;WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
  
  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"
  
  ;
	CreateDirectory $SMPROGRAMS\$R0
	CreateShortCut $SMPROGRAMS\$R0\Easy-PrintScreen.lnk $INSTDIR\Easy-PrintScreen.exe
	CreateShortCut $DESKTOP\Easy-PrintScreen.lnk $INSTDIR\Easy-PrintScreen.exe
SectionEnd

;--------------------------------
;Descriptions

  ;Language strings
  LangString Easy-PrintScreen ${LANG_ENGLISH} "Easy-PrintScreen"

  ;Assign language strings to sections
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
    !insertmacro MUI_DESCRIPTION_TEXT ${Easy-PrintScreen} $(Easy-PrintScreen)
  !insertmacro MUI_FUNCTION_DESCRIPTION_END

;--------------------------------
;Uninstaller Section

Section "Uninstall"

  ;ADD YOUR OWN FILES HERE...

  Delete "$INSTDIR\Uninstall.exe"
  Delete "$INSTDIR\KeyHook.dll"
  Delete "$INSTDIR\Easy-PrintScreen.exe"
  Delete "$INSTDIR\ScreenCapture.exe"
  Delete "$DESKTOP\Easy-PrintScreen.lnk"
  Delete "$SMPROGRAMS\$R0\Easy-PrintScreen.lnk"
  RMDir "$INSTDIR"

  ;DeleteRegKey /ifempty HKCU "Software\Modern UI Test"

SectionEnd